#include <ThreeWire.h>
#include <RtcDS1302.h>

// 管脚设置
#define DS1302_RST 27
#define DS1302_DAT 32
#define DS1302_CLK 33
ThreeWire myWire(DS1302_DAT, DS1302_CLK, DS1302_RST); // DAT, CLK, RST
RtcDS1302<ThreeWire> Rtc(myWire);

void init_RTC()
{
    Rtc.Begin(); //外置时间模块开启读取

    oled_print_single(0, 45, "RTC init..");
    delay(600);
}

String printDateTime(const RtcDateTime &dt)
{
    String timedata = String(String(dt.Month()) + "-" + String(dt.Day()) + "_" + String(dt.Hour()) + ":" + String(dt.Minute()));
    //Serial.println(timedata);
    return timedata;
}